package Keyword;

public class FinalDemo {
    private int a = 1;
    public static void main(String[] args) {
        final int x = 1;
//        x = 2;  // cannot assign value to final variable 'x'
        final FinalDemo y = new FinalDemo();
        FinalDemo z = new FinalDemo();
//        y = z; // Cannot assign a value to final variable 'y'
        y.a = 2;
        System.out.println(y.a);
    }

}
